package com.vito.act.tool;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.activiti.engine.impl.persistence.entity.ExecutionEntity;
import org.activiti.engine.impl.persistence.entity.TaskEntity;
import org.activiti.engine.impl.pvm.PvmTransition;
import org.activiti.engine.impl.pvm.process.ActivityImpl;

import com.vito.oa.act.constant.OaActContants;

public class ActivitTaskCreateListener implements TaskListener, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -555347596990106000L;

	@SuppressWarnings("unchecked")
	public void notify(DelegateTask delegateTask) {
//		TaskEntity task = (TaskEntity) delegateTask;
//		ExecutionEntity entity = task.getExecution();
//		Map<String, Object> originInfoMap = (Map<String, Object>) entity.getVariable(OaActContants.ORIGIN_TRANSITION);
//		if (null != originInfoMap) {
//			OaActivitiTool.restoreTransition((ActivityImpl) originInfoMap.get(OaActContants.ORIGIN_TRANSITION_ACT),
//					(List<PvmTransition>) originInfoMap.get(OaActContants.ORIGIN_TRANSITION_TRANS));
//		}
//		entity.setVariable(OaActContants.ORIGIN_TRANSITION, null);
	}

}
